﻿// Project: Salient
// http://salient.codeplex.com
// 
// Copyright 2010, Sky Sanders <sky at skysanders.net>
// Dual licensed under the MIT or GPL Version 2 licenses.
// http://salient.codeplex.com/license
// 
// Date: April 24 2010 

#region

using System.Net;
using System.Web.Script.Serialization;

#endregion



namespace Salient.Web.Hosting.ApplicationServices
{
    ///<summary>
    ///</summary>
    public static class RoleServiceHelperEx
    {

        ///<summary>
        ///</summary>
        ///<param name="server"></param>
        ///<param name="cookies"></param>
        ///<returns></returns>
        public static string[] RolesGetRolesForCurrentUserAppSvc(this IWebServer server, CookieContainer cookies)
        {
            return Salient.Web.ApplicationServices.RoleServiceHelper.RolesGetRolesForCurrentUserAppSvc(server.RootUrl, cookies);
        }


        ///<summary>
        ///</summary>
        ///<param name="server"></param>
        ///<param name="cookies"></param>
        ///<param name="role"></param>
        ///<returns></returns>
        public static bool RolesIsCurrentUserInRoleAppSvc(this IWebServer server, CookieContainer cookies, string role)
        {
            return Salient.Web.ApplicationServices.RoleServiceHelper.RolesIsCurrentUserInRoleAppSvc(server.RootUrl, cookies, role);
        }

 
    }
}